package com.health.controller;

import com.health.context.BaseContext;
import com.health.entity.UsersAccount;
import com.health.mapper.UsersAccountMapper;
import com.health.mapper.UsersTradeMapper;
import com.health.result.R;
import com.health.service.UsersAccountService;
import lombok.NonNull;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@Slf4j
@RestController
@RequestMapping("/user")
public class UserAccountController {


    @Autowired
    private UsersAccountService usersAccountService;

    @GetMapping("/account")
    public R getAccont(){
        Long Id = BaseContext.getCurrentId();

        UsersAccount u = usersAccountService.getById(Id);

        return R.success(u);
    }
}
